package lab02.Test28;

import java.util.InputMismatchException;
import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        System.out.println("请输入圆的半径");
        try {
            double r = scanner.nextDouble();
            System.out.println("该圆的面积为" + r * r * 3.14);
        }catch (InputMismatchException e){
            System.out.println("输入的值不正确！！！");
        }
    }
}
